package cn.wolfcode.luowowo.member.mapper;

import cn.wolfcode.luowowo.member.domain.Fans;
import cn.wolfcode.luowowo.member.domain.UserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserInfo record);

    UserInfo selectByPrimaryKey(Long id);

    List<UserInfo> selectAll();

    int updateByPrimaryKey(UserInfo record);

    int selectCountByPhone(String phone);

    UserInfo selectUserInfoByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    void update(UserInfo user);

    List<Fans> listByUserId(Long id);

    List<UserInfo> listByFansId(long id);

    void updateHeadImgUrl(@Param("headImgUrl") String headImgUrl, @Param("id") Long id);

    UserInfo selectByPhoneNum(@Param("phone") String phone, @Param("oldpassword") String oldpassword);

    void updatePassword(@Param("id") Long id, @Param("newpassword") String newpassword);

    void updateEmail(@Param("id") Long id, @Param("email") String email);

    void updatePhone(@Param("id") Long id, @Param("newphone") String newphone);

    List<UserInfo> state(@Param("state") int state);
}